package com.xd.spring.liteflow.component;

import cn.hutool.core.util.RandomUtil;
import com.yomahub.liteflow.core.NodeComponent;
import com.yomahub.liteflow.core.NodeForComponent;
import com.yomahub.liteflow.core.NodeIfComponent;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Component("forCmp")
@Slf4j
public class ForCmp extends NodeForComponent {

    @Override
    public int processFor() throws Exception {
        int i = RandomUtil.randomInt(5, 10);
        log.info("for i={}", i);
        return i;
    }
}
